<?php
if (session_id() == "") session_start();

ob_start();
require_once(dirname(dirname(__FILE__)) . "/config.php");
$out = ob_get_clean();
$tag = date('Ymd');
$ser = 'http://'.$_SERVER['SERVER_NAME'];
$targetUrl = $ser . $_SERVER['REQUEST_URI'];

$username = $_SESSION["username"];
$uid = $_SESSION["uid"];
$is_login = isset($_SESSION["username"]) && isset($_SESSION["uid"]);


$mid = $_REQUEST['mid'];
$cart_count = 0;
if ($is_login){
	$cart_count = $_SESSION["cart_count"];
	require SERVICE . '/product.class.php';
	$service = new Product();
	$model_info = $service->get_model_info($mid);
	$model_types = $service->get_model_types();
}else{
	header("Location:" . $ser);
	exit(0);
}

?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="Author" content="Spuser3D Inc." />
        <meta name="viewport" content="width=1024" />
        <title>Edit Model: <?php echo $model_info->mname?> - Spuser3D</title>
        <link rel="canonical" href="/model/edit/1174402/"/>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" type="text/css" href="/rrstatic/stylesheets/screen.css?tag=<?echo $tag?>"/>
		<link rel="stylesheet" type="text/css" href="/rrstatic/styles/jquery/jquery-ui-1.8.18.custom.css?tag=<?echo $tag?>">
		<link rel="stylesheet" type="text/css" href="/rrstatic/styles/jquery/jquery.selectbox.css?tag=<?echo $tag?>">
		
		<script type="text/javascript" src="/rrstatic/javascript/jquerys.min.js?tag=<?echo $tag?>"></script>
		<script type="text/javascript" src="/rrstatic/javascript/shared.jquery.js?tag=<?echo $tag?>"></script>
		<script type="text/javascript" src="/rrstatic/javascript/portal/Spuser3DApp.jquery.js?tag=<?echo $tag?>"></script>
		<!--[if lte IE 7]>
	    <link rel="stylesheet" href="rrstatic/stylesheets/jquery.fancybox.css?tag=20130604" type="text/css" media="screen" />
	    <script type="text/javascript" src="/rrstatic/javascript/fancybox/jquery.fancybox2.js?tag=<?echo $tag?>"></script>
	    <script type="text/javascript">
	        $(document).ready(function() {
	        $(".fancybox").fancybox();
	        $("#browser-redirect").fancybox().trigger('click');
	        SW.track('ie7-beware', { });
	      });
	    </script>
	    <div style="display:none;">
	      <div id="browser-redirect" style="width:600px; position:relative;">
	        <div style="margin:10px auto; text-align:center;"><img border="0" style="width: 163px; " alt="Logo" src="/rrstatic/img/sw-logo-dark.png"></div>
	        <h2><strong>Hello.</strong></h2>
	        <p>We're sorry to inform you that we no longer support this browser and can't confirm that everything will work as expected. For the best Spuser3D experience, please use one of the following browsers:</p>
	        <p>
	          <ul class="support-list">
	            <li>Get <a href="https://www.google.com/intl/en/chrome/browser/">Google Chrome</a></li>
	            <li>Get <a href="http://www.mozilla.org/en-US/firefox/new/">Firefox</a></li>
	            <li>Get <a href="http://windows.microsoft.com/en-us/internet-explorer/download-ie">Internet Explorer</a> latest version</li>
	          </ul>
	        </p>
	
	        <small><em>Click anywhere outside this window to continue.</em></small>
	      </div>
	    </div>
	  <![endif]-->
        <script>
            document.documentElement.className = 'js';
        </script>
        <script type="text/javascript">
            (function($){
                if (typeof $.swPortal == 'undefined') {
                    $.swPortal = {};
                }
                $.swPortal.rid = '1705130677';
                $.swPortal.eventTracking = {
                 	modelShareIntent: 'model_share_intent',
                    modelShareIntentComplete: 'model_share_intent_complete',
                    modelShareIntentLoggedOut: 'model_share_intent_logged_out'
                };
                $.swPortal.facebookAppId = '196244320391665';
                $.swPortal.sproto = true;
            })(jQuery);
        </script>
    </head>
    <body class="sct-model ">
        <input type="hidden" id="requestTrackingId" value="1705130677"/>
        <div class="">
            <div class='top-nav-block'>
                <?php include PAGE . '/head.php';?>
                <!-- ADD TO CART POPUP -->
                <div id="addtocart_popup_container" style="display:none;"></div>
                <script>
                    $('#addtocart_popup_container').prependTo('#header').show();
                    function close_addtocart_popup(){
                        var pop = document.getElementById('addtocart_popup_container');
                        pop.style.display = 'none';
                    }
                </script>
                <!-- END ADD TO CART POP UP -->
            </div>
            <div class=" clearfix ">
                <style type="text/css">
                    #chooseUploadScale {
                        display: none;
                        font-weight: bold;
                        border-bottom: 1px solid #DDDDDD;
                        box-shadow: 0 2px 0 white;
                        padding: 3px;
                    }
                    
                    #chooseUploadScale a {
                        margin: 10px;
                    }
                    
                    #uploadModelError {
                        display: none;
                    }
                    
                    #isIEBrowser {
                        display: none;
                    }
                </style>
                <div class="container">
                    <div id="model-detail-container" class="clearfix">
                        <div id="model-detail-left">
                            <div id="model-view">
                                <h1 class="inline-edit inline-edit-title"><?php echo $model_info->mname?></h1>
                                <div id="model-viewports">
                                    <div title="photos" class="model-viewport photos" id="model-viewport-photos-edit">
                                        <div id="model-viewport-photos-edit-inner">
                                            <form target="photoadd_iframe" id="photoadd-form" method="POST" enctype="multipart/form-data" action="/model/picture/upload/ajax" name="photoadd-form">
                                                <input type="hidden" name="model" value="1174402"><input type="hidden" value="2080000" name="MAX_FILE_SIZE">
                                                <label for="photoadd" class="add-photo">
                                                    <div style="float: left; background: url('/img/icons-viewport.gif') no-repeat scroll -41px 1px transparent; height: 20px; width: 30px;">
                                                        &nbsp;
                                                    </div>
                                                    添加图片
                                                    <br>
                                                    <div class="info">
                                                        <strong>Make your products look good on Spuser3D!</strong>
                                                        <p>
                                                            All images should be sized to 674px wide by 501px tall.
                                                            <br>
                                                            <small>
                                                                Maximum file size is 2mb.
                                                            </small>
                                                        </p>
                                                    </div>
                                                    <span class='error size-notification' style="width: 425px;display:none">
                                                        <small>
                                                            Oops,the size of the
                                                            picture is too big, the maximum file size is 2mb
                                                        </small>
                                                    </span>
                                                    <input type="file" id="photoadd" name="newphoto" class="file"/>
                                                </label>
                                            </form>
                                            <form id="default-picture" action="/model/picture/edit/ajax">
                                                <input type="hidden" id="modelId" name="modelId" value="1174402"/>
                                                <ul id="photolist">
                                                    <li>
                                                        <div class="photolist-thumb" style="background: url(<?php echo $model_info->picture?>) center center no-repeat;">
                                                        </div>
                                                        <small>
                                                            Caption:
                                                        </small>
                                                        <div class="font-medium photolist-noedit photolist-description" data-id="1094787">
                                                        </div>
                                                        <a style="display: none;" data-model="1174402" data-picture="1094787" href="javascript:void(0);" class="photo-delete delete-button">Remove</a>
                                                        <input class="tooltipped photo-default" title="Set the default photo for this model." type="radio" name="defaultPicture" value="1094787" checked="checked" />
                                                        <div class="clear">
                                                        </div>
                                                    </li>
                                                </ul>
                                            </form>
                                        </div>
                                    </div>
                                    <div style="display: none;" title="video" class="model-viewport video" id="model-viewport-video-edit">
                                        <div id="model-viewport-video-edit-inner">
                                            <div id="video-title">
                                                <div style="float: left; background: url('/img/icons-viewport.gif') no-repeat scroll -41px -18px transparent; height: 20px; width: 24px;">
                                                    &nbsp;
                                                </div>
                                                Add your YouTube video
                                            </div>
                                            <form id="youtube_form" action="/model/edit/video">
                                                <div id="edit-video-preview">
                                                    <a id="youtubeThumbUrl" href=""><img id="youtubeThumb" style="width: 105px; display:none" src="/rrstatic/images/youtube/1.png"></a>
                                                </div>
                                                <div id="edit-video-url">
                                                    <textarea id="youtubeUrl" placeholder="Paste the URL to your YouTube video. Example:http://youtu.be/TQoTro9WfbQ" name="youtubeUrl">
                                                    </textarea>
                                                    <input type="submit" id="videoUrlSaveButton" value="Add video" class="action-button">
                                                    <div class="clear">
                                                        &nbsp;
                                                    </div>
                                                </div>
                                                <input type="hidden" id="model_id" name="model_id" value="<?php echo $model_info->mid?>"/>
                                                <div class="clear">
                                                    &nbsp;
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                                <div id="model-viewports-selectors">
                                    <a class="active windowtoggle" id="windowtoggle-photos" title="photos"></a>
                                    <a class="windowtoggle" id="windowtoggle-video" title="video"></a>
                                </div>
                                <div class="clear">
                                </div>
                                <div id="model-view-info">
                                    <div id="model-designer-avatar-frame" class="side-avatar-frame">
                                        <div class="side-avatar" style="background: url('/rrstatic/img/avatar/nopicture-2013031201.png') center center no-repeat;">
                                        </div>
                                    </div>
                                    <div id="model-designer-info">
                                        <p>
                                            设计师 : <a href="/page/designer.php?i=<?php echo $model_info->uid?>" target="_blank"><?php echo $model_info->username?></a>
                                        </p>
                                    </div>
                                </div>
                                <h4>类别</h4>
                                <ul class="select-list">
                                    <li>
                                        <select id="category-selector-1" class="category-selector">
                                        	<?php
                                        	$m_type = $model_info->m_type;
                                        	foreach ($model_types as $type){
												if($m_type == $type->id)
                                        			echo '<option class="model-category"  selected="selected" id="model-category-' . $type->id .'" value="' . $type->id .'">' . $type->name .'</option>';
												else
                                        		echo '<option class="model-category" id="model-category-' . $type->id .'" value="' . $type->id .'">' . $type->name .'</option>';
                                        	}
                                        	?>
                                        </select>
                                        <div class="notice flag" id="cat-1-error" style='display:none'>
                                            category is required
                                        </div>
                                    </li>
                                </ul>
                                <br/>
                                <h4>编辑描述</h4>
                                <div class="inline-edit-area inline-edit-description">
                                	<?php echo $model_info->describes?>
                                </div>
                                <br>
                                <h4>原始边界</h4>
                                <div class="model-dimensions">
                                    In: &nbsp;
                                    2.1 w x
                                    4.5 d x
                                    1.5 h
                                </div>
                                <div class="model-dimensions">
                                    Cm: &nbsp;
                                    5.3 w x
                                    11.4 d x
                                    3.9 h
                                </div>
                                <hr class="space"><h4>调整边界<em>(用于确定印刷适性)</em></h4>
                                <div class="model-dimensions">
                                    In: &nbsp;
                                    2.1 w x
                                    4.5 d x
                                    1.4 h
                                </div>
                                <div class="model-dimensions">
                                    Cm: &nbsp;
                                    5.3 w x
                                    11.4 d x
                                    3.6 h
                                </div>
                                <div class="model-dimensions">
                                    容积: 66.99 cm&sup3;
                                </div>
                                <div class="model-dimensions">
                                    密度: 30.25%
                                </div>
                                <hr class="space">
                                <div id="description-container">
                                    <div class="model-update-area">
                                        <h4>文件状态</h4>
                                        <?php $file = $model_info->file?>
                                        <div class="success">
                                            v0: <?php $file?> -
                                            <small>
                                                <?php echo ' 于 ' . $model_info->r_time . '上传成功'?>
                                            </small>
                                        </div>
                                        <div class="notice">
								              v1: building.stl -
								              <small>Uploaded on 9 Jul 2013 &nbsp; [Processing]                               </small>
								          </div>
                                        <div class="error" id="uploadModelError">
                                        </div>
                                        <!--[if IE]>
                                        <div id="isIEBrowser"></div><![endif]-->
                                        <div id="uploader1174402" class="uploader">
                                            <a href="/model/edit/upload?model=1174402" class="action-button" id="uploaderButton1174402" data-model="1174402">
                                            上传该模型其他3D文件...</a>
                                            <span class="upload-status" id="uploadStatus1174402"></span>
                                        </div>
                                        <div id="chooseUploadScale" class="choose-upload-scale">
                                            <a href="" class="action-button block" id="chooseUploadScaleMeters" data-scale="0">Meters</a>
                                            <a href="" class="action-button block" id="chooseUploadScaleInches" data-scale="1">Inches</a>
                                            <a href="" class="action-button block" id="chooseUploadScaleMillimeters" data-scale="2">Millimeters</a>
                                        </div>
                                    </div>
                                    <br>
                                    <p>
                                        <input checked="checked" id="downloadable" type="checkbox" name="downloadable" value="1"/>允许下载
                                        &nbsp;|&nbsp;<a id="make-cocreator" href="javascript:void(0);" style="display:none;">使这个模型共同创造者</a>
                                    </p>
                                    <!-- CoCreator overlay rendered above -->
                                </div>
                                <!--model-description-->
                                <div class="clear">
                                </div>
                            </div>
                        </div>
                        <div id="model-detail-right">
                            <div id="edit-toggle" class="edit-toggle">
                                <a id="edit-toggle-btn" style="display: block" href="<?php echo '/page/model.php?mid=' . $model_info->mid?>">退出编辑</a>
                            </div>
                            <div id="model-edit-sale-status">
                                <p>
                                这个模型是<strong>公开显示</strong>和<strong>提供出售</strong>。
                            </p>
                            <div id="model-edit-sale-status-more">
                                <form method="post" id="sale_status_form" action="/ajax/model.php" name="salestatus_form">
                                    <input type="hidden" name="modelId" value="<?php echo $model_info->mid?>"/>
                                    <input type="hidden" name="isPublic" value="1"/>
                                    <input type="hidden" name="forSale" value="1"/>
                                    <input type="hidden" name="method" value="edit_visibility"/>
                                    <div class="tooltipped" title="使这个模型显示在网站的Spuser3D给他人。这个项目也将在你的商店,可见。">
                                        <input type="checkbox" checked="checked" class="sale-status-form" value="1" name="isPublic" id="public">
                                        <label for="public">
                                            公开显示
                                        </label>
                                    </div>
                                    <div class="tooltipped" title="允许用户直接从Spuser3D买这个模型。您可以编辑标记下面这个项目。">
                                        <input type="checkbox" checked="checked" class="sale-status-form" value="1" name="forSale" id="sale">
                                        <label for="sale">
                                            出售给其他人
                                        </label>
                                    </div>
                                    <input type="button" id="submitSaleStatusButton" value="更新" class="action-button block breathe-top">
                                    <div class="clear">
                                    </div>
                                </form>
                                <!-- sale_status_form -->
                            </div>
                            <!-- #model-edit-sale-status-more -->
                        </div>
                        <!-- #model-edit-sale-status -->
                        <form method="POST" action="" name="materials_form">
                            <div id="model-materials">
                                <h4>选择材料</h4>
                                <p>
                                    <p>
                                    </p>
                                    <div class="materials-exchange-rate">
                                    </div>
                                    <p>
                                    </p>
                                    <div id="materials-select-anchors">
                                        <a href="#" class="select-all-materials">选择全部</a>
                                        &nbsp;|&nbsp;
                                        <a href="#" class="select-default-material">只选择默认的材料</a>
                                    </div>
                                    <div class="clear">
                                    </div>
                                    <div id="edit-model-order-cart">
                                        <input class="failed_wallthickness_message" type="hidden" value="Warning: This model has failed our Automated Wall Thickness check and may be rejected during 3D printing in this material."/>
                                        <div id="edit-material-selectbox" class="editmaterials expanded">
                                            <input type="hidden" id="model_id3" name="model_id" value="1174402"/><input type="hidden" id="default-material-id" name="default_material_id" value="6">
                                            <ul class="material-type-dropdown">
                                                <input id="edit-markup-field-6" type="hidden" name="markup[6]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/plastic_wsf_white.jpg') -30px top no-repeat;" data-material-id="6" class="material-list-item-edit  defaultMaterial" id="edit-material-list-item-6">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image  default-material" id="edit-material-list-item-image-6" default-material>
                                                        <input checked disabled="disabled" type="checkbox" class="materials-enabled" id="material-enabled-6" data-material-id="6" name="materials_enabled[]" value="6" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="6">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        White Strong & Flexible
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 6" data-material-id="6" data-baseprice="62.39" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 6">62.39 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 6">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 6">62.39 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult6" data-material-id="6" class="makedefault  isdefault ">default material</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-62" type="hidden" name="markup[62]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/wsfp_thumb.jpg') -30px top no-repeat;" data-material-id="62" class="material-list-item-edit " id="edit-material-list-item-62">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-62">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-62" data-material-id="62" name="materials_enabled[]" value="62" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="62">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        White Strong & Flexible Polished
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 62" data-material-id="62" data-baseprice="67.24" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 62">67.24 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 62">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 62">67.24 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult62" data-material-id="62" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-25" type="hidden" name="markup[25]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/plastic_wsf_black.jpg') -30px top no-repeat;" data-material-id="25" class="material-list-item-edit " id="edit-material-list-item-25">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-25">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-25" data-material-id="25" name="materials_enabled[]" value="25" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="25">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Black Strong & Flexible
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 25" data-material-id="25" data-baseprice="77.87" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 25">77.87 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 25">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 25">77.87 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult25" data-material-id="25" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-76" type="hidden" name="markup[76]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/swatch-coral-red.jpg') -30px top no-repeat;" data-material-id="76" class="material-list-item-edit " id="edit-material-list-item-76">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-76">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-76" data-material-id="76" name="materials_enabled[]" value="76" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="76">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Coral Red Strong & Flexible Polished
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 76" data-material-id="76" data-baseprice="67.49" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 76">67.49 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 76">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 76">67.49 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult76" data-material-id="76" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-77" type="hidden" name="markup[77]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/swatch-hot-pink.jpg') -30px top no-repeat;" data-material-id="77" class="material-list-item-edit " id="edit-material-list-item-77">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-77">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-77" data-material-id="77" name="materials_enabled[]" value="77" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="77">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Hot Pink Strong & Flexible Polished
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 77" data-material-id="77" data-baseprice="67.49" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 77">67.49 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 77">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 77">67.49 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult77" data-material-id="77" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-78" type="hidden" name="markup[78]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/swatch-royal-blue.jpg') -30px top no-repeat;" data-material-id="78" class="material-list-item-edit " id="edit-material-list-item-78">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-78">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-78" data-material-id="78" name="materials_enabled[]" value="78" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="78">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Royal Blue Strong & Flexible Polished
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 78" data-material-id="78" data-baseprice="67.49" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 78">67.49 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 78">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 78">67.49 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult78" data-material-id="78" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-75" type="hidden" name="markup[75]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/swatch-violet-purple.jpg') -30px top no-repeat;" data-material-id="75" class="material-list-item-edit " id="edit-material-list-item-75">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-75">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-75" data-material-id="75" name="materials_enabled[]" value="75" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="75">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Violet Purple Strong & Flexible Polished
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 75" data-material-id="75" data-baseprice="67.49" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 75">67.49 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 75">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 75">67.49 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult75" data-material-id="75" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-61" type="hidden" name="markup[61]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/fud_thumb.jpg') -30px top no-repeat;" data-material-id="61" class="material-list-item-edit " id="edit-material-list-item-61">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-61">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-61" data-material-id="61" name="materials_enabled[]" value="61" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="61">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Frosted Ultra Detail
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 61" data-material-id="61" data-baseprice="238.80" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 61">238.80 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 61">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 61">238.80 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult61" data-material-id="61" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-60" type="hidden" name="markup[60]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/fd_thumb.jpg') -30px top no-repeat;" data-material-id="60" class="material-list-item-edit " id="edit-material-list-item-60">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-60">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-60" data-material-id="60" name="materials_enabled[]" value="60" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="60">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Frosted Detail
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 60" data-material-id="60" data-baseprice="165.11" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 60">165.11 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 60">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 60">165.11 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult60" data-material-id="60" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-5" type="hidden" name="markup[5]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/plastic_detail_white.jpg') -30px top no-repeat;" data-material-id="5" class="material-list-item-edit " id="edit-material-list-item-5">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-5">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-5" data-material-id="5" name="materials_enabled[]" value="5" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="5">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        White Detail
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 5" data-material-id="5" data-baseprice="202.81" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 5">202.81 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 5">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 5">202.81 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult5" data-material-id="5" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-7" type="hidden" name="markup[7]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/plastic_detail_black.jpg') -30px top no-repeat;" data-material-id="7" class="material-list-item-edit " id="edit-material-list-item-7">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-7">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-7" data-material-id="7" name="materials_enabled[]" value="7" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="7">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Black Detail
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 7" data-material-id="7" data-baseprice="202.81" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 7">202.81 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 7">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 7">202.81 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult7" data-material-id="7" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-4" type="hidden" name="markup[4]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/plastic_detail_transparent.jpg') -30px top no-repeat;" data-material-id="4" class="material-list-item-edit " id="edit-material-list-item-4">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-4">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-4" data-material-id="4" name="materials_enabled[]" value="4" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="4">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Transparent Detail
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 4" data-material-id="4" data-baseprice="202.81" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 4">202.81 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 4">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 4">202.81 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult4" data-material-id="4" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-27" type="hidden" name="markup[27]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/sandstone_no_color.jpg') -30px top no-repeat;" data-material-id="27" class="material-list-item-edit " id="edit-material-list-item-27">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-27">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-27" data-material-id="27" name="materials_enabled[]" value="27" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="27">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Sandstone
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 27" data-material-id="27" data-baseprice="53.24" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 27">53.24 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 27">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 27">53.24 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult27" data-material-id="27" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-72" type="hidden" name="markup[72]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/th_ebc.jpg') -30px top no-repeat;" data-material-id="72" class="material-list-item-edit " id="edit-material-list-item-72">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-72">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-72" data-material-id="72" name="materials_enabled[]" value="72" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="72">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Eggshell Blue Ceramics
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 72" data-material-id="72" data-baseprice="74.64" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 72">74.64 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 72">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 72">74.64 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult72" data-material-id="72" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-74" type="hidden" name="markup[74]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/th_pyc.jpg') -30px top no-repeat;" data-material-id="74" class="material-list-item-edit " id="edit-material-list-item-74">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-74">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-74" data-material-id="74" name="materials_enabled[]" value="74" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="74">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Pastel Yellow Ceramics
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 74" data-material-id="74" data-baseprice="74.64" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 74">74.64 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 74">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 74">74.64 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult74" data-material-id="74" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-70" type="hidden" name="markup[70]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/th_sbc.jpg') -30px top no-repeat;" data-material-id="70" class="material-list-item-edit " id="edit-material-list-item-70">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-70">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-70" data-material-id="70" name="materials_enabled[]" value="70" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="70">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Satin Black Ceramics
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 70" data-material-id="70" data-baseprice="74.64" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 70">74.64 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 70">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 70">74.64 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult70" data-material-id="70" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-73" type="hidden" name="markup[73]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/th_agc.jpg') -30px top no-repeat;" data-material-id="73" class="material-list-item-edit " id="edit-material-list-item-73">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-73">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-73" data-material-id="73" name="materials_enabled[]" value="73" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="73">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Avocado Green Ceramics
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 73" data-material-id="73" data-baseprice="74.64" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 73">74.64 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 73">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 73">74.64 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult73" data-material-id="73" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-64" type="hidden" name="markup[64]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/blackceramics_thumbnail.jpg') -30px top no-repeat;" data-material-id="64" class="material-list-item-edit " id="edit-material-list-item-64">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-64">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-64" data-material-id="64" name="materials_enabled[]" value="64" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="64">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Gloss Black Ceramics
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 64" data-material-id="64" data-baseprice="74.64" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 64">74.64 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 64">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 64">74.64 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult64" data-material-id="64" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-63" type="hidden" name="markup[63]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/ceramics-thumb.jpg') -30px top no-repeat;" data-material-id="63" class="material-list-item-edit " id="edit-material-list-item-63">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-63">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-63" data-material-id="63" name="materials_enabled[]" value="63" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="63">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Glazed Ceramics
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 63" data-material-id="63" data-baseprice="74.64" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 63">74.64 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 63">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 63">74.64 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult63" data-material-id="63" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-23" type="hidden" name="markup[23]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/metal_stainless_steel.jpg') -30px top no-repeat;" data-material-id="23" class="material-list-item-edit " id="edit-material-list-item-23">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-23">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-23" data-material-id="23" name="materials_enabled[]" value="23" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="23">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Stainless Steel
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 23" data-material-id="23" data-baseprice="541.94" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 23">541.94 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 23">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 23">541.94 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult23" data-material-id="23" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-31" type="hidden" name="markup[31]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/metal_gold_matt.jpg') -30px top no-repeat;" data-material-id="31" class="material-list-item-edit " id="edit-material-list-item-31">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-31">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-31" data-material-id="31" name="materials_enabled[]" value="31" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="31">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Gold Plated Matte
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 31" data-material-id="31" data-baseprice="544.94" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 31">544.94 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 31">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 31">544.94 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult31" data-material-id="31" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-39" type="hidden" name="markup[39]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/metal_gold_shiny.jpg') -30px top no-repeat;" data-material-id="39" class="material-list-item-edit " id="edit-material-list-item-39">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-39">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-39" data-material-id="39" name="materials_enabled[]" value="39" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="39">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Gold Plated Glossy
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 39" data-material-id="39" data-baseprice="544.94" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 39">544.94 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 39">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 39">544.94 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult39" data-material-id="39" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-37" type="hidden" name="markup[37]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/metal_bronze_matte.jpg') -30px top no-repeat;" data-material-id="37" class="material-list-item-edit " id="edit-material-list-item-37">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-37">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-37" data-material-id="37" name="materials_enabled[]" value="37" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="37">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Antique Bronze Matte
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 37" data-material-id="37" data-baseprice="543.44" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 37">543.44 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 37">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 37">543.44 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult37" data-material-id="37" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-38" type="hidden" name="markup[38]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/metal_bronze_shiny.jpg') -30px top no-repeat;" data-material-id="38" class="material-list-item-edit " id="edit-material-list-item-38">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-38">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-38" data-material-id="38" name="materials_enabled[]" value="38" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="38">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Antique Bronze Glossy
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 38" data-material-id="38" data-baseprice="543.44" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 38">543.44 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 38">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 38">543.44 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult38" data-material-id="38" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-66" type="hidden" name="markup[66]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/polished_plastic_alumide.jpg') -30px top no-repeat;" data-material-id="66" class="material-list-item-edit " id="edit-material-list-item-66">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-66">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-66" data-material-id="66" name="materials_enabled[]" value="66" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="66">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Polished Alumide
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 66" data-material-id="66" data-baseprice="135.49" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 66">135.49 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 66">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 66">135.49 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult66" data-material-id="66" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-28" type="hidden" name="markup[28]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/plastic_alumide.jpg') -30px top no-repeat;" data-material-id="28" class="material-list-item-edit " id="edit-material-list-item-28">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-28">
                                                        <input checked type="checkbox" class="materials-enabled" id="material-enabled-28" data-material-id="28" name="materials_enabled[]" value="28" style="float: right; margin: 5px;" /><input type="hidden" name="materials_available[]" value="28">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Alumide
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 28" data-material-id="28" data-baseprice="118.74" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 28">118.74 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 28">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 28">118.74 </span></span>
                                                        </p>
                                                    </span>
                                                    <span id="madedefult28" data-material-id="28" class="makedefault ">make default</span>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-82" type="hidden" name="markup[82]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/swatch-elasto-2013052201.jpg') -30px top no-repeat;" data-material-id="82" class="material-list-item-edit " id="edit-material-list-item-82">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-82">
                                                        <input disabled="disabled" type="checkbox" class="materials-enabled" id="material-enabled-82" data-material-id="82" name="materials_enabled[]" value="82" style="float: right; margin: 5px;"/><input type="hidden" name="materials_available[]" value="82">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Elasto Plastic
                                                    </p>
                                                    <span class="material-list-price-container">
                                                        <p class="material-list-item-price 82" data-material-id="82" data-baseprice="119.19" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 82">119.19 </span>
                                                            <span class="material-list-markup-container" style=" display: none;"><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 82">0.00 </span></span>
                                                            <span class="material-list-totalprice-container" style="display: none;"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 82">119.19 </span></span>
                                                        </p>
                                                    </span>
                                                    <div class="notice flag" style="right: 0px; left: auto; bottom: 0; top: auto;">
                                                        Maker Material
                                                    </div>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-26" type="hidden" name="markup[26]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/sandstone_full_color.jpg') -30px top no-repeat;" data-material-id="26" class="material-list-item-edit " id="edit-material-list-item-26">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-26">
                                                        <input disabled="disabled" type="checkbox" class="materials-enabled" id="material-enabled-26" data-material-id="26" name="materials_enabled[]" value="26" style="float: right; margin: 5px;"/><input type="hidden" name="materials_available[]" value="26">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Full Color Sandstone
                                                    </p>
                                                    <span class="material-list-price-container" style="display:none;">
                                                        <p class="material-list-item-price 26" data-material-id="26" data-baseprice="0.00" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 26">0.00 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 26">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 26">0.00 </span></span>
                                                        </p>
                                                    </span>
                                                    <div class="error flag" style="right: 0px; left: auto; bottom: 0; top: auto;">
                                                        Not Printable
                                                    </div>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-81" type="hidden" name="markup[81]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/swatch-premium-silver-2013030403.png') -30px top no-repeat;" data-material-id="81" class="material-list-item-edit " id="edit-material-list-item-81">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-81">
                                                        <input disabled="disabled" type="checkbox" class="materials-enabled" id="material-enabled-81" data-material-id="81" name="materials_enabled[]" value="81" style="float: right; margin: 5px;"/><input type="hidden" name="materials_available[]" value="81">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Premium Silver
                                                    </p>
                                                    <span class="material-list-price-container" style="display:none;">
                                                        <p class="material-list-item-price 81" data-material-id="81" data-baseprice="0.00" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 81">0.00 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 81">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 81">0.00 </span></span>
                                                        </p>
                                                    </span>
                                                    <div class="error flag" style="right: 0px; left: auto; bottom: 0; top: auto;">
                                                        Not Printable
                                                    </div>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-54" type="hidden" name="markup[54]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/silver_glossy.jpg') -30px top no-repeat;" data-material-id="54" class="material-list-item-edit " id="edit-material-list-item-54">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-54">
                                                        <input disabled="disabled" type="checkbox" class="materials-enabled" id="material-enabled-54" data-material-id="54" name="materials_enabled[]" value="54" style="float: right; margin: 5px;"/><input type="hidden" name="materials_available[]" value="54">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Silver Glossy
                                                    </p>
                                                    <span class="material-list-price-container" style="display:none;">
                                                        <p class="material-list-item-price 54" data-material-id="54" data-baseprice="0.00" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 54">0.00 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 54">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 54">0.00 </span></span>
                                                        </p>
                                                    </span>
                                                    <div class="error flag" style="right: 0px; left: auto; bottom: 0; top: auto;">
                                                        Not Printable
                                                    </div>
                                                </li>
                                                <!-- .material-list-item-edit --><input id="edit-markup-field-53" type="hidden" name="markup[53]" value="0.00">
                                                <li style="background: url('http://static1.sw-cdn.net/rrstatic/img/materials/silver.jpg') -30px top no-repeat;" data-material-id="53" class="material-list-item-edit " id="edit-material-list-item-53">
                                                    <div class="">
                                                    </div>
                                                    <div class="material-list-item-image " id="edit-material-list-item-image-53">
                                                        <input disabled="disabled" type="checkbox" class="materials-enabled" id="material-enabled-53" data-material-id="53" name="materials_enabled[]" value="53" style="float: right; margin: 5px;"/><input type="hidden" name="materials_available[]" value="53">
                                                    </div><!-- //.material-list-item-image -->
                                                    <p class="material-list-item-name" style="font-size: .9em; padding-bottom; 3px;">
                                                        Silver
                                                    </p>
                                                    <span class="material-list-price-container" style="display:none;">
                                                        <p class="material-list-item-price 53" data-material-id="53" data-baseprice="0.00" data-currency="USD">
                                                            <span style="float: left">$ </span>
                                                            <span class="material-list-baseprice 53">0.00 </span>
                                                            <span class="material-list-markup-container" style=""><span style="float: left">&nbsp;+ $</span><span class="price-edit material-list-markup 53">0.00 </span></span>
                                                            <span class="material-list-totalprice-container"><span style="float: left">&nbsp;= $</span><span class="price-edit material-list-totalprice 53">0.00 </span></span>
                                                        </p>
                                                    </span>
                                                    <div class="error flag" style="right: 0px; left: auto; bottom: 0; top: auto;">
                                                        Not Printable
                                                    </div>
                                                </li>
                                                <!-- .material-list-item-edit -->
                                            </ul>
                                            <!-- .material-type-dropdown -->
                                        </div>
                                        <input type="button" id="materialsBoxSaveButton" value="Update Materials & Pricing" class="action-button" style="width: 258px"/>
                                        <div class="clear">
                                        </div>
                                        <!-- #model-order-cart -->
                                    </div>
                                    </form>
                                    <div id="model-edit-keywords" class="view">
                                        <h4 class="tags">标签</h4>
                                        <div data-id="" class="keyword-edit">
                                            <div data-keyword="car" class="keyword-edit-inner">
                                                ipad
                                            </div>
                                            <a href="javascript:void(0)" class="keyword-delete"></a>
                                        </div>
                                        <a href="javascript:void(0);" class="tag-add" id="keyword-add">+ 添加标签</a>
                                        <div class="clear">
                                            &nbsp;
                                        </div>
                                    </div>
                                </div>
                            </div>
                            </div>
                            <iframe style="width: 0px; height: 0px; border: 0px;" name="photoadd_iframe" id="photoadd_iframe">
                            </iframe>
                            <!-- pop up update model modal --><!-- preload the images -->
                            <div id="cocreator" class="edit-modal" style="left:0;top:0;">
                                <style type="text/css">
                                    input.rdvalues {
                                        width: 90px;
                                    }
                                    
                                    input.drvalues {
                                        width: 100px;
                                    }
                                    
                                    a.btAddVal {
                                        font-size: 90%;
                                    }
                                </style>
                                <td id="cocreator-template-variables" colspan="2">
                                    <div id='cocreator-template-variables-form-errors' style='text-align: center'>
                                    </div>
                                    <div style="clear:both">
                                    </div>
                                    <form style="display: block;" id="cocreator-template-variables-form" action="/cocreator/save-variables/1174402">
                                        <table class="cocreatorvars" id="cocreatorvars">
                                            <tbody>
                                                <tr>
                                                    <th title="Give a descriptive name to the variable">
                                                        Label
                                                    </th>
                                                    <th class="cocreatortype" title="What kind of variable is it? Make sure to select 'numeric' for numeric values, so you can use the min and max to check if the value is in a proper range.">
                                                        Type
                                                    </th>
                                                    <th title="The minimum allowed characters (for a 'text' variable) or the minimum value (for a 'numeric' variable)">
                                                        Min
                                                    </th>
                                                    <th title="The maximum allowed characters (for a 'text' variable) or the maximum value (for a 'numeric' variable)">
                                                        Max
                                                    </th>
                                                    <th class="obligatory" title="Make a variable obligatory. Customers will be required to enter a value for obligatory variables in order to customize the template.">
                                                        *
                                                    </th>
                                                    <th title="Give a detailed description of what and why you expect users to provide a value for this variable.">
                                                        Explanation
                                                    </th>
                                                    <th width=40px title="Add or delete a new value.">
                                                    </th>
                                                </tr>
                                                <tr class="cocreatorvar" data-varcount="0">
                                                    <td>
                                                        <input name="variables[0][ignore]" type='hidden' value="0" /><input class="variable_label" name="variables[0][label]" type='text' value="" />
                                                    </td>
                                                    <td class="cocreatortype">
                                                        <select id="variable_type" class="variable_type" name="variables[0][type]">
                                                            <option value=text>Text</option>
                                                            <option value=numeric>Numeric</option>
                                                            <option value=numeric_mm>Numeric (mm)</option>
                                                            <option value=numeric_cm>Numeric (cm)</option>
                                                            <option value=numeric_inches>Numeric (inches)</option>
                                                            <option value=picture>Picture</option>
                                                            <option value=dropdown>Dropdown list</option>
                                                            <option value=radio>Radiobuttons</option>
                                                        </select>
                                                        <div id="drValuesContainer" class="drValuesContainer" style="display:none;">
                                                            <div>
                                                                <input class="drvalues" name=variables[0][drvalues][1] type='text'>
                                                            </div>
                                                            <div style="text-align: right">
                                                                <a onclick="SW.MODEL.addDropdownInput(this, '0')"><span class="rdadd">+ Add</span></a>
                                                            </div>
                                                        </div>
                                                        <div id="rdValuesContainer" class="rdValuesContainer" style="display:none;">
                                                            <div>
                                                                <input type="radio" value="1" class="rdvaluesRadio" checked="checked" name=variables[0][rdvaluesRadio]><input class="rdvalues" name=variables[0][rdvalues][1] type='text'>
                                                            </div>
                                                            <div style="text-align: right">
                                                                <a onclick="SW.MODEL.addRadioInput(this, '0')"><span class="rdadd">+ Add</span></a>
                                                            </div>
                                                        </div>
                                                        <div id="rdExp" style="font-size: 80%; display:none;">
                                                            Selected option is default
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <input class="variable_min numeric" name="variables[0][min]" id="variables[0][min]" type='text' value="0" size="2" /><span class="variable_min_hidden" style="display:none">N/A</span>
                                                    </td>
                                                    <td>
                                                        <input class="variable_max numeric" name="variables[0][max]" id="variables[0][max]" type='text' value="0" size="2" /><span class="variable_max_hidden" style="display:none">N/A</span>
                                                    </td>
                                                    <td>
                                                        <input class="variable_required" name="variables[0][required]" id="variables[0][required]" type='checkbox' value="1" />
                                                    </td>
                                                    <td>
                                                        <textarea class="variable_explanation" name="variables[0][explanation]">
                                                        </textarea>
                                                    </td>
                                                    <td width=10px>
                                                        <a onclick="SW.MODEL.addRow(this); this.className = 'btDelete2'" class="bt btAddRow floatleft"></a>
                                                    </td>
                                                </tr>
                                                <tr class="cocreatorvar-hidden" data-varcount="1" style="display:none;">
                                                    <td>
                                                        <input name="variables[1][ignore]" type='hidden' value="1" /><input class="variable_label" name="variables[1][label]" type='text' value="" />
                                                    </td>
                                                    <td class="cocreatortype">
                                                        <select id="variable_type" class="variable_type" name="variables[1][type]">
                                                            <option value=text>Text</option>
                                                            <option value=numeric>Numeric</option>
                                                            <option value=numeric_mm>Numeric (mm)</option>
                                                            <option value=numeric_cm>Numeric (cm)</option>
                                                            <option value=numeric_inches>Numeric (inches)</option>
                                                            <option value=picture>Picture</option>
                                                            <option value=dropdown>Dropdown list</option>
                                                            <option value=radio>Radiobuttons</option>
                                                        </select>
                                                        <div id="drValuesContainer" class="drValuesContainer" style="display:none;">
                                                            <div>
                                                                <input class="drvalues" name=variables[1][drvalues][1] type='text'>
                                                            </div>
                                                            <div style="text-align: right">
                                                                <a onclick="SW.MODEL.addDropdownInput(this, '1')"><span class="rdadd">+ Add</span></a>
                                                            </div>
                                                        </div>
                                                        <div id="rdValuesContainer" class="rdValuesContainer" style="display:none;">
                                                            <div>
                                                                <input type="radio" value="1" class="rdvaluesRadio" checked="checked" name=variables[1][rdvaluesRadio]><input class="rdvalues" name=variables[1][rdvalues][1] type='text'>
                                                            </div>
                                                            <div style="text-align: right">
                                                                <a onclick="SW.MODEL.addRadioInput(this, '1')"><span class="rdadd">+ Add</span></a>
                                                            </div>
                                                        </div>
                                                        <div id="rdExp" style="font-size: 80%; display:none;">
                                                            Selected option is default
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <input class="variable_min numeric" name="variables[1][min]" id="variables[1][min]" type='text' value="0" size="2" /><span class="variable_min_hidden" style="display:none">N/A</span>
                                                    </td>
                                                    <td>
                                                        <input class="variable_max numeric" name="variables[1][max]" id="variables[1][max]" type='text' value="0" size="2" /><span class="variable_max_hidden" style="display:none">N/A</span>
                                                    </td>
                                                    <td>
                                                        <input class="variable_required" name="variables[1][required]" id="variables[1][required]" type='checkbox' value="1" />
                                                    </td>
                                                    <td>
                                                        <textarea class="variable_explanation" name="variables[1][explanation]">
                                                        </textarea>
                                                    </td>
                                                    <td width=10px>
                                                        <a onclick="SW.MODEL.addRow(this); this.className = 'btDelete2'" class="bt btAddRow floatleft"></a>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                        <p>
                                            <small>
                                                You can add a maximum of 20 values.
                                            </small>
                                        </p>
                                        <label for="cocreator_production_days">
                                            <span>My production time</span>
                                        </label>
                                        <input name="cocreator_production_days" id="cocreator_production_days" title="Co-Creator Production Days" class="tooltipped numeric" type='text' size="2" maxlength="2" value="" />
                                        <label>
                                            days
                                        </label>
                                        <br/>
                                        <br/>
                                        <label for="cocreator_max_volume_cm3">
                                            <span>Max volume</span>
                                            <span class='obligatory floatleft'>*</span>
                                        </label>
                                        <input class="tooltipped" name="cocreator_max_volume_cm3" id="cocreator_max_volume_cm3" title="Co-Creator Max Volume" class="numeric" type='text' size="8" maxlength="8" value="0" />
                                        <label>
                                            cm&sup3; (current volume 66.9928 cm&sup3;)
                                        </label>
                                        <br/>
                                        <br/>
                                        <input id="cocreator_terms_accepted" name='cocreator_terms_accepted' type="checkbox" value="1" />
                                        <label for="cocreator_terms_accepted">
                                            I agree to the <a href="/cocreator/template_terms_and_conditions" target="_new">terms and conditions</a>.
                                        </label>
                                        <br/>
                                        <br/>
                                        <div>
                                            <a style="float:left;" id="saveCoCreatorSettings" href="#template-details" class="action-button">Save Co-Creator Settings</a>
                                        </div>
                                    </form>
                                </td>
                                </tr>
                                <script src="/rrstatic/javascript/Spuser3D.cocreator.js?tag=<?php echo $tag?>"></script>
                                <script src="/rrstatic/javascript/Spuser3D.model.js?tag=<?php echo $tag?>"></script>
                                <script type='text/javascript'>
                                    jQuery(document).ready(function(){
                                        SW.COCREATOR.setObservers();
                                        
                                        $('#saveCoCreatorSettings').unbind('click'); // make sure to bind only once
                                        $('#saveCoCreatorSettings').click(function(e){
                                            var $button = $(this);
                                            var validator = new SW.COCREATOR.TEMPLATEVARS.Validate('#cocreator-template-variables-form', '#cocreator-template-variables-form-errors', 10);
                                            if (validator.validate()) {
                                                $button.addClass('waiting');
                                                jQuery.ajax({
                                                    type: 'post',
                                                    url: $button.closest('form').attr('action'),
                                                    data: $button.closest('form').serialize(),
                                                    dataType: 'json',
                                                    success: function(response){
                                                        $button.removeClass('waiting');
                                                        if (response.success) {
                                                            window.location.reload();
                                                        }
                                                        else {
                                                            var $error = response.error ? response.error : 'Error';
                                                            alert($error);
                                                        }
                                                    },
                                                    error: function(){
                                                        $button.removeClass('waiting');
                                                        alert('Connection error');
                                                    }
                                                });
                                            }
                                            return false;
                                        });
                                        
                                        
                                        jQuery('input.numeric').each(function(numeric_input){
                                            jQuery(this).blur(function(){
                                                this.value = parseFloat(this.value);
                                                if (isNaN(this.value)) 
                                                    this.value = 0;
                                            });
                                        });
                                        
                                        jQuery('select.variable_type:enabled').each(function(){
                                            $(this).change(selectVariableChange).triggerHandler('change');
                                        });
                                    });
                                    
                                    selectVariableChange = function(){
                                        $this = $(this);
                                        $val = $this.val();
                                        if (jQuery.inArray($val, ['picture', 'dropdown', 'radio']) > -1) {
                                            $this.closest('tr.cocreatorvar').find('.variable_min').hide();
                                            $this.closest('tr.cocreatorvar').find('.variable_max').hide();
                                            $this.closest('tr.cocreatorvar').find('.variable_min_hidden').show();
                                            $this.closest('tr.cocreatorvar').find('.variable_max_hidden').show();
                                        }
                                        else {
                                            $this.closest('tr.cocreatorvar').find('.variable_min_hidden').hide();
                                            $this.closest('tr.cocreatorvar').find('.variable_max_hidden').hide();
                                            $this.closest('tr.cocreatorvar').find('.variable_min').show();
                                            $this.closest('tr.cocreatorvar').find('.variable_max').show();
                                        }
                                        if (jQuery.inArray($val, ['radio']) > -1) {
                                            $this.closest('tr.cocreatorvar').find('.variable_obligatory').attr('checked', 'checked');
                                            $this.closest('tr.cocreatorvar').find('.variable_obligatory').attr('disabled', 'disabled');
                                        }
                                        else {
                                            $this.closest('tr.cocreatorvar').find('.variable_obligatory').removeAttr('disabled');
                                        }
                                    };
                                    
                                    var maxvalues = 20;
                                </script>
                                <div id="tooltip1" class="tooltiptext" style="display: none;">
                                </div>
                                <div id="tooltip2" class="tooltiptext" style="display: none;">
                                </div>
                            </div>
                            <script type="text/javascript" src="/rrstatic/javascript/jquery/jquery.ui.selectmenu.js?tag=<?php echo $tag ?>"></script>
                            <script type="text/javascript" src="/rrstatic/javascript/jquery/jquery.jeditable.mini.js?tag=<?php echo $tag ?>"></script>
                            <script type="text/javascript" src="/rrstatic/javascript/modernizr.custom.js?tag=<?php echo $tag ?>"></script>
                            <script type="text/javascript" src="/rrstatic/javascript/jquery/jquery-placeholder.js?tag=<?php echo $tag ?>"></script>
                            <script type="text/javascript" src="/rrstatic/javascript/jquery/jquery.form.js?tag=<?php echo $tag ?>"></script>
                            <script type="text/javascript" src="/rrstatic/javascript/jquery/edit.productdetail.jquery.js?tag=<?php echo $tag ?>"></script>
                            <script type="text/javascript" src="/rrstatic/javascript/jquery/plupload.full.js?tag=<?php echo $tag ?>"></script>
                            <script>
                            var $uploadButton = $('#uploaderButton1174402');
                                var uploader = new plupload.Uploader({
                                    runtimes: $('#isIEBrowser').length ? 'flash,silverlight' : 'html5,flash,gears',
                                    browse_button: $uploadButton.attr('id'),
                                    container: 'uploader' + $uploadButton.data('model'),
                                    max_file_size: '64mb',
                                    url: $uploadButton.attr('href'),
                                    multi_selection: false,
                                    max_file_count: 1,
                                    //autostart : true,
                                    flash_swf_url: '/rrstatic/javascript/jquery/plupload/js/plupload.flash.swf',
                                    silverlight_xap_url: '/rrstatic/javascript/jquery/plupload/js/plupload.silverlight.xap',
                                    multipart: true
                                    //, multipart_params : {model_id: $uploadButton.data('model'), scale: ''}
                                });
                                
                                uploader['uploadButton'] = $uploadButton;
                                uploader['uploadStatus'] = $('#uploadStatus' + $uploadButton.data('model'));
                                
                                uploader.init();
                                
                                uploader.bind('FilesAdded', function(up, files){
                                    $newFile = files[0];
                                    var $i = 0;
                                    while ($i < up.files.length) {
                                        if (up.files[$i].id != $newFile.id) {
                                            up.removeFile(up.files[$i]);
                                        }
                                        else {
                                            $i++;
                                        }
                                    }
                                    var $ext = $newFile.name.split('.').pop().toLowerCase();
                                    if ($ext == 'stl' || $ext == 'wrl' || $ext == 'obj' || $ext == 'zip') {
                                        var $selectedUploader = up;
                                        showDialog('chooseUploadScale', 'Choose a scale', true, '200px');
                                        $('#chooseUploadScale').dialog('option', 'close', function(){
                                            $selectedUploader = null;
                                        });
                                    }
                                    else {
                                        showDialogText('Please wait while your model is being uploaded...  <div id="uploadWait" style="padding-top:20px; text-align:center;"><img src="/img/loading.gif" /></div>', 'Please wait...', true, '400px', 'alphacube');
                                        up.start();
                                        up.uploadButton.hide();
                                        up.uploadStatus.html($newFile.name + ' (uploading)').show();
                                    }
                                    
                                    up.refresh(); // Reposition Flash/Silverlight
                                });
                                
                                uploader.bind('UploadProgress', function(up, file){
                                    up.uploadStatus.html(file.name + ' (' + file.percent + '%)').show();
                                });
                                
                                uploader.bind('Error', function(up, err){
                                    if (err.file) {
                                        $('#uploadModelError').html('We encountered an error uploading you file (' + err.file.name + ')').show().delay(5000).fadeOut();
                                        up.uploadStatus.hide();
                                        up.uploadButton.show();
                                        //$('#' + file.id + " b").html("Error: " + err.message + " ("+err.code+")");
                                    }
                                    
                                    up.refresh(); // Reposition Flash/Silverlight
                                });
                                
                                uploader.bind('FileUploaded', function(up, file, info){
                                    $response = $.parseJSON(info.response);
                                    if ($response['success'] == true) {
                                        window.location.reload(true);
                                    }
                                    if ($response['error']) {
                                        $('#uploadModelError').html(file.name + ': ' + $response['error']).show().delay(15000).fadeOut();
                                        up.uploadStatus.hide();
                                        up.uploadButton.show();
                                    }
                                });
                                
                                $('#chooseUploadScale a').click(function(){
                                    $url = uploader.uploadButton.attr('href') + '&scale=' + $(this).data('scale');
                                    uploader.settings.url = $url;
                                    showDialogText('Please wait while your model is being uploaded...  <div id="uploadWait" style="padding-top:20px; text-align:center;"><img src="/img/loading.gif" /></div>', 'Please wait...', true, '400px', 'alphacube');
                                    uploader.start();
                                    uploader.uploadButton.hide();
                                    uploader.uploadStatus.html($newFile.name + ' (uploading)').show();
                                    $('#chooseUploadScale').dialog('close');
                                    return false;
                                });
                                
                                function showProcessingNotes(modelFileId){
                                    jQuery.ajax({
                                        type: "GET",
                                        url: "/model/model-processing-notes/" + modelFileId,
                                        success: function(data){
                                            showDialogText(data, 'Model Processing Notes', true, '500px', 'modelProcessingNotes');
                                        },
                                        error: function(data){
                                            window.alert('An error occurred.  Please try again later.');
                                        }
                                    });
                                }
                                
                            </script>
                        </div>
                        <!-- begin bottom.tpl -->
                        <!-- begin bottom.tpl -->
            <?php include PAGE . '/footer.php';?>
            <!-- LEGAL -->
			<?php include PAGE . '/footer_legal.php';?>
        </div>
        <script>
            $('input[placeholder], textarea[placeholder]').placeholder();
        </script>
        <!--[if IE]>
            <div id="iecontainer"></div>
        <![endif]-->
    </body>
</html>